package com.am;

import java.util.Calendar;
import java.util.Date;

public abstract class AMObject {
	private Date createTime;
	private int resistance;
	
	public Date getCreateTime() {
		return createTime;
	}

	public int getResistance() {
		return resistance;
	}
	
	protected int reduceResistance(int a){
		int ret = resistance - a;
		if(ret < 0) ret = 0;
		resistance = ret;
		return ret;
	}

	public AMObject(int defaultResistance){
		createTime = Calendar.getInstance().getTime();
		resistance = defaultResistance;
	}
}
